package com.pai.entity.vmodel;

import java.util.ArrayList;
import java.util.List;

/**
 * 用户信息（前端视图模型）
 */
public class UserInfo {
    private int personnelId;  //人员id
    private String userName;  //人员名称
    private int departmentId;  //部门id
    private String departmentName;  //部门名称
    private int rolesId;  //角色id
    private List<String> roles;  //角色名称列表
    private int appuserId;  //账号id
    private String appuserAccount;  //账号值

    public int getPersonnelId() {
        return personnelId;
    }

    public void setPersonnelId(int personnelId) {
        this.personnelId = personnelId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public int getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(int departmentId) {
        this.departmentId = departmentId;
    }

    public String getDepartmentName() {
        return departmentName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    public int getRolesId() {
        return rolesId;
    }

    public void setRolesId(int rolesId) {
        this.rolesId = rolesId;
    }

    public List<String> getRoles() {
        return roles;
    }

    public void setRoles(String [] roles) {
        this.roles = new ArrayList<>();
        for(int i = 0; i < roles.length; i ++) {
            this.roles.add(roles[i]);
        }
    }

    public int getAppuserId() {
        return appuserId;
    }

    public void setAppuserId(int appuserId) {
        this.appuserId = appuserId;
    }

    public String getAppuserAccount() {
        return appuserAccount;
    }

    public void setAppuserAccount(String appuserAccount) {
        this.appuserAccount = appuserAccount;
    }
}
